package com.sitech.ibnms.c3p.mappers;

import com.sitech.ibnms.c3p.domain.C3pTask;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;

/**
 * Created by liujhc on 7/15.
 */

public interface C3pTaskMapper {
    C3pTask findById(@Param("taskId") String taskId);

    @Cacheable("longTerm")
    String queryC3pTaskIdByProcessId(@Param("processId") int processId);

    @Cacheable("longTerm")
    C3pTask queryBySerialNo(@Param("serialNo") int serialNo);

    String queryScheduleIdBySerialNo(@Param("serialNo") int serialNo);

    /**
     * 获取流程实例锁
     *
     * @param execId
     * @return
     */
    Integer lockInstance(@Param("execId") int execId);

    /**
     * 根据任务id获取任务配置类型
     * @param taskId
     * @return
     */
    String queryTaskConfTypeByTaskId(@Param("taskId") String taskId);
}
